package org.example.rabbitmqserver01;

import jakarta.annotation.Resource;
import org.junit.jupiter.api.Test;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.boot.test.context.SpringBootTest;

import static org.example.rabbitmqserver01.config.RabbitmqConfigSx.BUSINESS_EXCHANGE_NAME;

@SpringBootTest
class rabbitmqServerApplicationTests01 {
    @Resource
    private RabbitTemplate rabbitTemplate;

    @Test
    void contextLoads() {
        Object msg = "deadletter";
        rabbitTemplate.convertSendAndReceive(BUSINESS_EXCHANGE_NAME, "", msg);
    }

}
